package org.wdh.extend.visitor;

class TreeCopier implements TreeVisitor {
	public Object forBranch(Branch that) {
		return new Branch(that.getValue(), (Tree) that.getLeft().accept(this),
				(Tree) that.getRight().accept(this));
	}

	public Object forLeaf(Leaf that) {
		return new Leaf();
	}
}
